package com.ruoyi.base.domain;

import java.util.Date;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 班级对象 base_class
 * 
 * @author yepanpan
 * @date 2020-11-09
 */
@ApiModel("班级实体")
@Getter
@Setter
public class BaseClass extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 所属专业 */
    @ApiModelProperty("所属专业ID")
    @NotNull(message="所属专业不能为空")
    private Long specId;
    

    /** 所属专业 */
    @Excel(name = "所属专业", prompt = "必填项")
    @ApiModelProperty("所属专业")
    private String specName;

    /** 年级 */
    @Excel(name = "年级", prompt = "必填项")
    @NotNull(message="年级不能为空")
    @ApiModelProperty("年级")
    @Min(value = 1980, message = "年级不合法")
    @Max(value = 2099, message = "年级不合法")
    private Integer year;

    /** 班级代码 */
    @Excel(name = "班级代码", prompt = "必填项")
    @ApiModelProperty("班级代码")
    @NotBlank(message="班级代码不能为空")
    private String code;

    /** 学制 */
    @Excel(name = "学制", prompt = "必填项")
    @ApiModelProperty("学制")
    @NotNull(message="学制不能为空")
    @Min(value = 1, message = "学制不合法")
    @Max(value = 12, message = "学制不合法")
    private Integer period;

    /** 班级名称 */
    @Excel(name = "班级名称", prompt = "必填项")
    @ApiModelProperty("班级名称")
    @NotBlank(message="班级名称不能为空")
    private String title;

    /** 建班日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "建班日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("建班日期")
    private Date startDate;

    /** 毕业日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "毕业日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("毕业日期")
    private Date endDate;

    /** 班主任 */
    @ApiModelProperty("班主任ID")
    private Long masterUser;
    

    /** 班主任 */
    @Excel(name = "班主任")
    @ApiModelProperty("班主任")
    private String masterUserName;

    /** 固定教室 */
    @ApiModelProperty("固定教室")
    @NotNull(message="固定教室不能为空")
    private Long roomId;
    @Excel(name = "固定教室")
    private String roomName;

    /** 状态 */
    @Excel(name = "状态", dictType = "common_status", combo = {"启用","禁用"})
    @ApiModelProperty("状态")
    private String status;

   
	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("specId", getSpecId())
            .append("specName", getSpecName())
            .append("year", getYear())
            .append("code", getCode())
            .append("period", getPeriod())
            .append("title", getTitle())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("masterUser", getMasterUser())
            .append("masterUserName", getMasterUserName())
            .append("roomId", getRoomId())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
